#include "window.h"
#include "widget_factory.h"

using namespace krryn::gui;

window::window(const with &a_Initializer)
: m_Pimpl(create_widget_base<impl>()) {
	m_Pimpl->make(a_Initializer);
}

void *window::handle(){
	return m_Pimpl->handle();
}

window_initializer::window_initializer()
	: m_Title("krryn::window")
{
	m_Width = 640;
	m_Height = 480;
}

window_initializer &window_initializer::title(const std::string &a_Title){
	m_Title = a_Title;
	return *this;
}

window::ptr window_initializer::create(){
	return new window(*this);
}